const mock = require('./mock.min.js')

const mockUser = [{
		id: 1,
		name: 'admin',
		account: 'admin',
		password: '123456'
	},
	{
		id: 2,
		name: '盖亚',
		account: 'gaiya',
		password: '123456'
	},
	{
		id: 3,
		name: '阿赖耶',
		account: 'alaiye',
		password: '123456'
	},

	{
		id: 4,
		name: '金闪闪',
		account: 'jinshanshan',
		password: '123456'
	},
	{
		id: 5,
		name: 'saber',
		account: 'saber',
		password: '123456'
	}
]

export function login(param) {
	let {
		account,
		password
	} = param
	return mockUser.find(v => v.account === account && v.password === password) || null
}


